package com.pubinfo.passbook.common.model.vo.contract;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.pubinfo.passbook.common.entity.TContractWriteoffRelation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Collections;
import java.util.List;

@Data
@ApiModel(value = "WriteOffRollbackVo", description = "回退信息")
public class WriteOffRollbackVo {
    @ApiModelProperty("报账单id")
    @TableId(value = "writeoff_id", type = IdType.AUTO)
    private Integer writeoffId;

    @ApiModelProperty("报账单号")
    @TableField(value = "witeoff_Instance_code")
    private String witeoffInstanceCode;

    @ApiModelProperty("外围系统主单唯一标志，每次报账都必须是唯一，不允许重复")
    @TableField(value = "other_system_main_id")
    private String otherSystemMainId;

    @ApiModelProperty("合同ID")
    @TableField(value = "contract_id")
    private Integer contractId;

    @ApiModelProperty("合同编码")
    @TableField(value = "contract_no")
    private String contractNo;

    @ApiModelProperty("合同名称")
    @TableField(value = "contract_name")
    private String contractName;

    @ApiModelProperty("报账类型")
    @TableField(value = "writeoff_type")
    private Integer writeoffType;

    @ApiModelProperty("报账人帐号")
    @TableField(value = "account")
    private String account;

    @ApiModelProperty("报账人姓名")
    @TableField(value = "fill_in_name")
    private String fillInName;

    @ApiModelProperty("报账组织编码")
    @TableField(value = "fill_in_org_code")
    private String fillInOrgCode;

    @ApiModelProperty("公司代码")
    @TableField(value = "sap_compay_code")
    private String sapCompayCode;

    @ApiModelProperty("经济事项编码")
    @TableField(value = "economic_item_code")
    private String economicItemCode;

    @ApiModelProperty("经济事项名称")
    @TableField(value = "economic_item_name")
    private String economicItemName;

    @ApiModelProperty("收支方式")
    @TableField(value = "payment_type")
    private String paymentType;

    @ApiModelProperty("费用发生日")
    @TableField(value = "happen_date")
    private String happenDate;

    @ApiModelProperty("报账期间")
    @TableField(value = "budget_set")
    private String budgetSet;

    @ApiModelProperty("业务类型")
    @TableField(value = "biz_type")
    private String bizType;

    @ApiModelProperty("会计科目编码")
    @TableField(value = "account_code")
    private String accountCode;

    @ApiModelProperty("会计科目名称")
    @TableField(value = "account_name")
    private String accountName;

    @ApiModelProperty("会计科目类型")
    @TableField(value = "account_type")
    private String accountType;

    @ApiModelProperty("是否员工代垫")
    @TableField(value = "is_staff_payment")
    private String isStaffPayment;

    @ApiModelProperty("报账金额")
    @TableField(value = "sum")
    private BigDecimal sum;

    @ApiModelProperty("票据类型")
    @TableField(value = "invoice_type")
    private String invoiceType;

    @ApiModelProperty("是否需要手工扫描")
    @TableField(value = "is_need_image")
    private String isNeedImage;

    @ApiModelProperty("是否存在实物赠送")
    @TableField(value = "is_real_gift")
    private String isRealGift;

    @ApiModelProperty("纳税属性")
    @TableField(value = "pay_tax_attribute")
    private String payTaxAttribute;

    @ApiModelProperty("业务场景")
    @TableField(value = "picking_mode")
    private String pickingMode;

    @ApiModelProperty("sap凭证号")
    @TableField(value = "sap_certificate_code")
    private String sapCertificateCode;

    @ApiModelProperty("是否加急")
    @TableField(value = "is_emergency")
    private String isEmergency;

    @ApiModelProperty("报账单状态")
    @TableField(value = "status")
    private Integer status;

    @ApiModelProperty("报账单状态")
    @TableField(value = "year")
    private String year;

    @ApiModelProperty("制证人账号")
    @TableField(value = "sap_creator")
    private String sapCreator;

    @ApiModelProperty("说明，-3状态对应的发起失败信息")
    @TableField(value = "abstract_")
    private String abstract_;

    @ApiModelProperty("核定金额")
    @TableField(value = "audit_sum")
    private Double auditSum;

    @ApiModelProperty("当前处理环节")
    @TableField(value = "act_name")
    private String actName;

    @ApiModelProperty("当前处理人账号")
    @TableField(value = "handler_account")
    private String handlerAccount;

//    /**
//     * 前端json
//     */
//    @TableField(typeHandler = FastjsonTypeHandler.class)
//    private Object json;
//
//    /**
//     * xml报文
//     */
//    private String xml;




    @ApiModelProperty("行项目号")
    @TableField(value = "other_system_detail_id")
    private String otherSystemDetailId;



    @JsonIgnore
    @ApiModelProperty("用途编码")
    @TableField(value = "usage_code")
    private String usageCode;

    @JsonIgnore
    @ApiModelProperty("用途名称")
    @TableField(value = "usage_name")
    private String usageName;

    @ApiModelProperty("列账属性")
    @TableField(value = "budget_type")
    private Byte budgetType;

//    @ApiModelProperty("子单金额")
//    @TableField(value = "sum")
//    private BigDecimal ssum;

    @ApiModelProperty("摘要")
    @TableField(value = "desc_te")
    //@NotEmpty(message = "摘要不能为空")
    private String desc;


    @ApiModelProperty("Wbs编号")
    @TableField(value = "wbs_no")
    private String wbsNo;

    @ApiModelProperty("Wbs名称")
    @TableField(value = "wbs_name")
    private String wbsName;

    @ApiModelProperty(value = "挑对成本信息")
    public List<IncomeInfoVo> writeOffInfo = Collections.emptyList();

}
